<?php
/* @var $this SiteController */
$this->layout = '//layouts/column1';
$this->pageTitle = Yii::t("messages", Yii::app()->name);
Yii::app()->getClientScript()->registerScriptFile(Yii::app()->baseUrl.'/assets/theme_a/js/pages/index.js', CClientScript::POS_END);

?>

<!-- Flex Slider Start -->
<section id="banner" class="flexslider flex_slider">
    <ul class="slides">
        <li><a href="#"><img src="<?php echo Yii::app()->request->baseUrl; ?>/assets/theme_a/image/slider/slide-1.jpg"
                             alt="slide-1"/></a></li>
        <li><a href="#"><img src="<?php echo Yii::app()->request->baseUrl; ?>/assets/theme_a/image/slider/slide-2.jpg"
                             alt="slide-2"/></a></li>
        <li><a href="#"><img src="<?php echo Yii::app()->request->baseUrl; ?>/assets/theme_a/image/slider/slide-3.jpg"
                             alt="slide-3"/></a></li>
    </ul>
</section>

<!-- Flex Slider End-->
<!-- Welcom Text Start-->
<div class="welcome"><?php echo Yii::t("messages", 'Welcome to').' '.Yii::t("messages", Yii::app()->name)    ?></div>
<p> <?php echo $this->contact->ABOUT_SHORT_DETAIL ?></p>
<!-- Welcom Text End-->
<!-- Featured Product Start-->
<section class="box">
    <div class="box-heading"><?php echo Yii::t("messages", "Feature") ?></div>
    <div class="box-content">
        <div class="box-product">
            <div class="flexslider featured_carousel">
                <ul class="slides">
                    <?php
                        foreach($features as $feature){
                            echo CHtml::openTag('li');
                            echo CHtml::openTag('div', array("class"=>"slide-inner"));
                            echo CHtml::openTag('div', array("class"=>"image"));
                            echo CHtml::link('<img  src="'.Yii::app()->request->baseUrl.'/assets/theme_a/image/product/lotto-sports-shoes-white-210x210.jpg" alt="Lotto Sports Shoes"/>', array('product/index', "catSlug"=>$feature->Menu->MENU_SLUG, "prodSlug" => $feature->SLUG));
                            echo CHtml::closeTag('div')."\n";
                            echo CHtml::openTag('div', array("class"=>"name"));
                            echo CHtml::link($feature->PRODUCT_NAME, array('product/index', "catSlug"=>$feature->Menu->MENU_SLUG, "prodSlug" => $feature->SLUG));
                            echo CHtml::closeTag('div')."\n";
                            echo CHtml::openTag('div', array("class"=>"clear"));
                            echo CHtml::closeTag('div');
                            echo CHtml::closeTag('div')."\n";
                            echo CHtml::closeTag('li')."\n";
                        }
                    ?>

                </ul>
            </div>
        </div>
    </div>
</section>

<!-- Featured Product End-->
<!-- Product Tab Start-->
<section id="product-tab" class="product-tab">
<ul id="tabs" class="tabs">
    <li><a href="#tab-latest"><?php echo Yii::t("messages", "Lastest") ?></a></li>
    <li><a href="#tab-bestseller"><?php echo Yii::t("messages", "Bestsellers") ?></a></li>
</ul>
<div id="tab-latest" class="tab_content">
    <div class="box-product">
        <div class="flexslider latest_carousel_tab">
            <ul class="slides">
                <?php
                    foreach($lastests as $lastest){
                        echo CHtml::openTag('li');
                        echo CHtml::openTag('div', array("class"=>"slide-inner"));
                        echo CHtml::openTag('div', array("class"=>"image"));
                        echo CHtml::link('<img  src="'.Yii::app()->request->baseUrl.'/assets/theme_a/image/product/lotto-sports-shoes-white-210x210.jpg" alt="Lotto Sports Shoes"/>', array('product/index', "catSlug"=>$lastest->Menu->MENU_SLUG, "prodSlug" => $lastest->SLUG));
                        echo CHtml::closeTag('div')."\n";
                        echo CHtml::openTag('div', array("class"=>"name"));
                        echo CHtml::link($lastest->PRODUCT_NAME, array('product/index', "catSlug"=>$lastest->Menu->MENU_SLUG, "prodSlug" => $lastest->SLUG));
                        echo CHtml::closeTag('div')."\n";
                        echo CHtml::openTag('div', array("class"=>"clear"));
                        echo CHtml::closeTag('div');
                        echo CHtml::closeTag('div')."\n";
                        echo CHtml::closeTag('li')."\n";
                    }
                ?>
            </ul>
        </div>
    </div>
</div>
<div id="tab-bestseller" class="tab_content">
    <div class="box-product">
        <div class="flexslider bestseller_carousel_tab">
            <ul class="slides">
                <?php
                    foreach($bestSellers as $bestSeller){
                        echo CHtml::openTag('li');
                        echo CHtml::openTag('div', array("class"=>"slide-inner"));
                        echo CHtml::openTag('div', array("class"=>"image"));
                        echo CHtml::link('<img  src="'.Yii::app()->request->baseUrl.'/assets/theme_a/image/product/lotto-sports-shoes-white-210x210.jpg" alt="Lotto Sports Shoes"/>', array('product/index', "catSlug"=>$bestSeller->Menu->MENU_SLUG, "prodSlug" => $bestSeller->SLUG));
                        echo CHtml::closeTag('div')."\n";
                        echo CHtml::openTag('div', array("class"=>"name"));
                        echo CHtml::link($bestSeller->PRODUCT_NAME, array('product/index', "catSlug"=>$bestSeller->Menu->MENU_SLUG, "prodSlug" => $bestSeller->SLUG));
                        echo CHtml::closeTag('div')."\n";
                        echo CHtml::openTag('div', array("class"=>"clear"));
                        echo CHtml::closeTag('div');
                        echo CHtml::closeTag('div')."\n";
                        echo CHtml::closeTag('li')."\n";
                    }
                ?>
            </ul>
        </div>
    </div>
</div>

</section>
<!-- Product Tab End-->
<!-- Carousel Start-->
<section id="brandLogo">
    <ul class="jcarousel-skin-opencart">
        <li><a href="#"><img
                    src="<?php echo Yii::app()->request->baseUrl; ?>/assets/theme_a/image/product/brand_logo.jpg"
                    alt="brand_logo" title="brand_logo"/></a></li>
        <li><a href="#"><img
                    src="<?php echo Yii::app()->request->baseUrl; ?>/assets/theme_a/image/product/brand_logo.jpg"
                    alt="brand_logo" title="brand_logo"/></a></li>
        <li><a href="#"><img
                    src="<?php echo Yii::app()->request->baseUrl; ?>/assets/theme_a/image/product/brand_logo.jpg"
                    alt="brand_logo" title="brand_logo"/></a></li>
        <li><a href="#"><img
                    src="<?php echo Yii::app()->request->baseUrl; ?>/assets/theme_a/image/product/brand_logo.jpg"
                    alt="brand_logo" title="brand_logo"/></a></li>
        <li><a href="#"><img
                    src="<?php echo Yii::app()->request->baseUrl; ?>/assets/theme_a/image/product/brand_logo.jpg"
                    alt="brand_logo" title="brand_logo"/></a></li>
        <li><a href="#"><img
                    src="<?php echo Yii::app()->request->baseUrl; ?>/assets/theme_a/image/product/brand_logo.jpg"
                    alt="brand_logo" title="brand_logo"/></a></li>
    </ul>
</section>

<!-- Carousel End-->

